package com.jwsoft.manager.core.gateway.controller;

import com.alibaba.fastjson.JSON;
import com.bifang.assistant.common.constants.Validators;
import com.bifang.assistant.common.vo.BaseVO;
import com.bifang.engine.assistant.core.domain.AppResponse;
import com.bifang.engine.assistant.core.exception.AppException;
import com.bifang.engine.protect.core.annotation.Idempotent;
import com.bifang.engine.protect.core.annotation.NoSignCrypto;
import com.bifang.module.base.common.vo.dict.SelectVO;
import com.bifang.module.base.common.vo.excel.ExcelReadVO;
import com.bifang.module.base.common.vo.excel.ExcelVO;
import com.bifang.module.base.core.utils.ExcelFileUtil;
import com.bifang.module.base.core.utils.ServiceRequestUtil;
import com.github.pagehelper.PageInfo;
import com.jwsoft.manager.common.vo.eduFormEnroll.EduConfigNameAliasVO;
import com.jwsoft.manager.common.vo.eduFormEnroll.EduEnrollSchoolChooseHouseVO;
import com.jwsoft.manager.common.vo.eduFormEnroll.EduEnrollSchoolFileVO;
import com.jwsoft.manager.common.vo.eduSchoolConfig.SchoolConfigQueryVO;
import com.jwsoft.manager.common.vo.eduSchoolConfig.SchoolConfigVO;
import com.jwsoft.manager.common.vo.eduSocialSecurity.EduSocialSecurityQueryVO;
import com.jwsoft.manager.common.vo.eduSocialSecurityDetail.EduSocialSecurityDetailVO;
import com.jwsoft.manager.common.vo.eduStudentEnroll.*;
import com.jwsoft.manager.common.vo.eduStudentEnrollPre.EduStudentEnrollPreKeyVO;
import com.jwsoft.manager.common.vo.eduStudentEnrollPre.EduStudentEnrollPreVO;
import com.jwsoft.manager.common.vo.eduStudentEnrollVerification.EduStudentEnrollVerificationVO;
import com.jwsoft.manager.core.integration.EduStudentEnrollJhIntegration;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * 学生注册表网关
 *
 * @author wangtao
 */
@RestController
@RequestMapping(value = "/doc/api")
@Tag(name = "金华学生正式报名管理", description = "金华学生正式报名管理")
public class EduStudentEnrollJhController {

    @Autowired
    public EduStudentEnrollJhIntegration eduStudentEnrollIntegration;

    @Operation(summary = "学生正式报名管理分页查询",description = "学生正式报名管理分页查询")
    @PostMapping(value = "/eduStudentEnrollJh0001", produces = "application/json;charset=UTF-8")
    public AppResponse<PageInfo<EduStudentEnrollVO>> getList(@RequestBody @Validated EduStudentEnrollQueryVO vo) {
        return AppResponse.successData(eduStudentEnrollIntegration.getList(vo));
    }

    @Operation(summary = "学生报名撤销分页查询-金华模式",description = "学生报名撤销分页查询-金华模式")
    @PostMapping(value = "/eduStudentEnrollJh0041", produces = "application/json;charset=UTF-8")
    public AppResponse<PageInfo<EduStudentEnrollVO>> getQuashList(@RequestBody @Validated EduStudentEnrollQueryVO vo) {
        return AppResponse.successData(eduStudentEnrollIntegration.getQuashList(vo));
    }

    @Operation(summary = "教育局查询单个学生报名信息-金华模式",description = "教育局查询单个学生报名信息-金华模式")
    @PostMapping(value = "/eduStudentEnrollJh0040", produces = "application/json;charset=UTF-8")
    public AppResponse<PageInfo<EduStudentEnrollVO>> getListByJyj(@RequestBody @Validated EduStudentEnrollQueryVO vo) {
        return AppResponse.successData(eduStudentEnrollIntegration.getListByJyj(vo));
    }
    @Operation(summary = "学生正式报名管理根据主键查询详情",description = "学生正式报名管理根据主键查询详情")
    @PostMapping(value = "/eduStudentEnrollJh0002", produces = "application/json;charset=UTF-8")
    public AppResponse<EduStudentEnrollVO> getById(@RequestBody @Validated EduStudentEnrollKeyVO vo) {
        return AppResponse.successData(eduStudentEnrollIntegration.getById(vo));
    }
    @Operation(summary = "家长端查询可报名的人员信息",description = "家长端查询可报名的人员信息")
    @PostMapping(value = "/eduStudentEnrollJh0023", produces = "application/json;charset=UTF-8")
    public AppResponse<List<BmStudentVO>> getPreListByToken(@RequestBody @Validated BmQueryVO vo) {
        return AppResponse.successData(eduStudentEnrollIntegration.getPreListByToken(vo));
    }

    @Operation(summary = "家长端查询可报名的人员信息",description = "家长端查询可报名的人员信息")
    @PostMapping(value = "/eduStudentEnrollJh0028", produces = "application/json;charset=UTF-8")
    public AppResponse<EduStudentEnrollPreVO> getBeforeByPreId(@RequestBody @Validated EduStudentEnrollPreKeyVO vo) {
        return AppResponse.successData(eduStudentEnrollIntegration.getBeforeByPreId(vo));
    }

    @Operation(summary = "家长端查询可报名的人员信息批量", description = "家长端查询可报名的人员信息批量")
    @PostMapping(value = "/eduStudentEnrollJh0059", produces = "application/json;charset=UTF-8")
    public AppResponse<List<EduStudentEnrollPreVO>> getBeforeBatch(@RequestBody @Validated BmQueryVO vo) {
        return AppResponse.successData(eduStudentEnrollIntegration.getBeforeBatch(vo));
    }
    @Idempotent(expire="PT2S") //2秒内防重复提交
    @Operation(summary = "学生正式报名管理线下录入报名",description = "学生正式报名管理线下录入报名")
    @PostMapping(value = "/eduStudentEnrollJh0004", produces = "application/json;charset=UTF-8")
    public AppResponse<SaveStudentEnrollVO> add(@RequestBody @Validated(value = {Validators.Add.class}) SaveStudentEnrollVO vo) {
        return AppResponse.successData(eduStudentEnrollIntegration.add(vo));
    }

    @Idempotent(expire = "PT2S") //2秒内防重复提交
    @Operation(summary = "线下录入导入模板下载", description = "线下录入导入模板下载")
    @PostMapping(value = "/eduStudentEnrollJh0084", produces = "application/json;charset=UTF-8")
    @NoSignCrypto
    public void downloadByCode(
            HttpServletRequest request,
            @RequestParam Map<String, Object> paramMap,
            @RequestBody(required = false) String body,
            HttpServletResponse response) {
        ExcelVO vo = null;
        if (StringUtils.isNotBlank(body)) {
            vo = JSON.parseObject(body, ExcelVO.class);
        } else {
            vo = new ExcelVO();
            if (paramMap.get("modelCode") != null) {
                vo.setModelCode(paramMap.get("modelCode").toString());
            }
            if (paramMap.get("excelVersion") != null) {
                vo.setExcelVersion(paramMap.get("excelVersion").toString());
            }
            if (paramMap.get("rows") != null) {
                vo.setRows(Integer.parseInt(paramMap.get("rows").toString()));
            }
            if (paramMap.get("dictMap") != null) {
                vo.setDictMap(
                        (Map<String, List<SelectVO>>)
                                JSON.parse(JSON.toJSONString(paramMap.get("dictMap"))));
            }

        }
        vo.setAccessToken(ServiceRequestUtil.getAccessToken(request, response));
        if (StringUtils.isBlank(vo.getModelCode())) {
            throw new AppException("excel模板编号不能为空");
        }
        eduStudentEnrollIntegration.downloadModel(vo, response);
    }

    @Idempotent(expire="PT2S") //2秒内防重复提交
    @Operation(summary = "线下录入excel导入保存",description = "线下录入excel导入保存")
    @PostMapping(value = "/eduStudentEnrollJh0085", produces = "application/json;charset=UTF-8")
    @NoSignCrypto
    public AppResponse<ExcelReadVO> readByCode(
            HttpServletRequest request,
            @RequestParam Map<String, Object> paramMap,
            HttpServletResponse response) throws IOException {
        ExcelVO vo= ExcelFileUtil.getExcelVO(request,response,paramMap);
        MultipartFile file=ExcelFileUtil.getExcelFile(request);
        return AppResponse.successData(eduStudentEnrollIntegration.readExcel(vo, file));
    }
    @Idempotent(expire="PT2S") //2秒内防重复提交
    @Operation(summary = "家长端义务段正式报名保存",description = "家长端义务段正式报名保存")
    @PostMapping(value = "/eduStudentEnrollJh0019", produces = "application/json;charset=UTF-8")
    public AppResponse<SaveStudentEnrollVO> saveEnrollApp(@RequestBody @Validated(value = {Validators.Add.class}) SaveStudentEnrollVO vo) {
        return AppResponse.successData(eduStudentEnrollIntegration.saveEnrollApp(vo));
    }
    @Idempotent(expire="PT2S") //2秒内防重复提交
    @Operation(summary = "家长端重新提交材料",description = "家长端重新提交材料")
    @PostMapping(value = "/eduStudentEnrollJh0076", produces = "application/json;charset=UTF-8")
    public AppResponse resubmitEnrollApp(@RequestBody ResubmitStudentEnrollVO vo) {
        eduStudentEnrollIntegration.resubmitEnrollApp(vo);
        return AppResponse.successMsg("成功");
    }
    @Idempotent(expire="PT2S") //2秒内防重复提交
    @Operation(summary = "学校或管理员驳回",description = "学校或管理员驳回")
    @PostMapping(value = "/eduStudentEnrollJh0077", produces = "application/json;charset=UTF-8")
    public AppResponse<SaveStudentEnrollVO> resubmitBh(@RequestBody  EduStudentEnrollBhVO vo) {
        eduStudentEnrollIntegration.resubmitBh(vo);
        return AppResponse.successMsg("成功");
    }
    @Idempotent(expire="PT2S") //2秒内防重复提交
    @Operation(summary = "学生正式报名管理修改",description = "学生正式报名管理修改")
    @PostMapping(value = "/eduStudentEnrollJh0005", produces = "application/json;charset=UTF-8")
    public AppResponse<EduStudentEnrollVO> edit(@RequestBody @Validated(value = {Validators.Edit.class}) EduStudentEnrollVO vo) {
        return AppResponse.successData(eduStudentEnrollIntegration.edit(vo));
    }

    @Idempotent(expire="PT2S") //2秒内防重复提交
    @Operation(summary = "学生正式报名管理删除",description = "学生正式报名管理删除")
    @PostMapping(value = "/eduStudentEnrollJh0006", produces = "application/json;charset=UTF-8")
    public AppResponse del(@RequestBody @Validated EduStudentEnrollKeyVO vo) {
        eduStudentEnrollIntegration.del(vo);
        return AppResponse.successMsg("删除成功！");
    }
    @Operation(summary = "判断登录用户是否学生",description = "判断登录用户是否学生")
    @PostMapping(value = "/eduStudentEnrollJh0007", produces = "application/json;charset=UTF-8")
    public AppResponse UserIsStudent(@RequestBody BaseVO vo) {
        return AppResponse.successData(eduStudentEnrollIntegration.UserIsStudent(vo));
    }
    @Operation(summary = "判断是否可以摇号绑定",description = "判断是否可以摇号绑定")
    @PostMapping(value = "/eduStudentEnrollJh0049", produces = "application/json;charset=UTF-8")
    public AppResponse<List<BindEnrollVO>> checkBind(@RequestBody BindEnrollQueryVO vo) {
        return AppResponse.successData(eduStudentEnrollIntegration.checkBind(vo));
    }
    @Operation(summary = "我的报名查询",description = "我的报名查询")
    @PostMapping(value = "/eduStudentEnrollJh0008", produces = "application/json;charset=UTF-8")
    public AppResponse<List<MyYearEnrollVO>> getMyEnrollInfo(@RequestBody MyEnrollQueryVO vo) {
        return AppResponse.successData(eduStudentEnrollIntegration.getMyEnrollInfo(vo));
    }

    @PostMapping(value = "/eduStudentEnrollJh0009", produces = "application/json;charset=UTF-8")
    @Operation(summary = "查询报名情况",description = "查询报名情况")
    public AppResponse<Boolean> checkEnroll(@RequestBody YjbmQueryVO vo) {
        return AppResponse.successData(eduStudentEnrollIntegration.checkEnroll(vo));
    }

    @PostMapping(value = "/eduStudentEnrollJh0010", produces = "application/json;charset=UTF-8")
    @Operation(summary = "校验是否可以摇号导出",description = "校验是否可以摇号导出")
    public AppResponse checkYhExp(@RequestBody EduStudentEnrollQueryVO vo) {
        eduStudentEnrollIntegration.checkYhExp(vo);
        return AppResponse.success();
    }

    @Idempotent(expire="PT10S") //2秒内防重复提交
    @Operation(summary = "义务教育民转公报名摇号信息导出",description = "义务教育民转公报名摇号信息导出")
    @PostMapping(value = "/eduStudentEnrollJh0011", produces = "application/json;charset=UTF-8")
    @NoSignCrypto
    public void exportYwMzgApplyInfo(@RequestBody @Validated EduStudentEnrollQueryVO vo, HttpServletResponse response) {
        eduStudentEnrollIntegration.exportYwMzgApplyInfo(vo,response);
    }


    @Idempotent(expire="PT2S") //2秒内防重复提交
    @Operation(summary = "义务教育民转公摇号信息导入",description = "义务教育民转公摇号信息导入")
    @PostMapping(value = "/eduStudentEnrollJh0012", produces = "application/json;charset=UTF-8")
    public AppResponse<YwMbApplyFileVO> inputYwMzgApplyInfo(
            YwMbApplyFileVO vo, @RequestParam("file") MultipartFile file) throws IOException {
        return AppResponse.successData(eduStudentEnrollIntegration.inputYwMzgApplyInfo(vo, file));
    }


    @Operation(summary = "获取义务教育报名单个明细",description = "获取义务教育报名单个明细")
    @PostMapping(value = "/eduStudentEnrollJh0013", produces = "application/json;charset=UTF-8")
    public AppResponse<EduStudentEnrollVO> getYwApplyDetail(@RequestBody @Validated EduStudentEnrollKeyVO vo) {
        return AppResponse.successData(eduStudentEnrollIntegration.getYwApplyDetail(vo));
    }

    @Idempotent(expire="PT2S") //2秒内防重复提交
    @Operation(summary = "义务教育报名一键退回到待审核",description = "义务教育报名一键退回到待审核")
    @PostMapping(value = "/eduStudentEnrollJh0014", produces = "application/json;charset=UTF-8")
    public AppResponse ywApplyBackAuth(@RequestBody @Validated(value = {Validators.Edit.class}) EduStudentEnrollKeyVO vo) {
        eduStudentEnrollIntegration.backAuth(vo);
        return AppResponse.success();
    }

    @Idempotent(expire="PT2S") //2秒内防重复提交
    @Operation(summary = "义务教育报名退回",description = "义务教育报名退回")
    @PostMapping(value = "/eduStudentEnrollJh0064", produces = "application/json;charset=UTF-8")
    public AppResponse ywApplyBack(@RequestBody @Validated(value = {Validators.Edit.class}) EduStudentEnrollKeyVO vo) {
        eduStudentEnrollIntegration.ywApplyBackDg(vo);
        return AppResponse.success();
    }
    @Idempotent(expire="PT2S") //2秒内防重复提交
    @Operation(summary = "家长端义务教育报名撤销",description = "家长端义务教育模拟报名撤销")
    @PostMapping(value = "/eduStudentEnrollJh0063", produces = "application/json;charset=UTF-8")
    public AppResponse ywApplyBackApp(@RequestBody @Validated(value = {Validators.Edit.class}) EduStudentEnrollKeyVO vo) {
        eduStudentEnrollIntegration.ywApplyBackApp(vo);
        return AppResponse.success();
    }
    @Idempotent(expire="PT2S") //2秒内防重复提交
    @Operation(summary = "义务教育报名修改报名状态",description = "义务教育报名修改报名状态")
    @PostMapping(value = "/eduStudentEnrollJh0016", produces = "application/json;charset=UTF-8")
    public AppResponse updateEnrollStatus(@RequestBody @Validated(value = {Validators.Edit.class}) UpdateEnrollStatusVO vo) {
        eduStudentEnrollIntegration.updateEnrollStatus(vo);
        return AppResponse.success();
    }

    @Operation(summary = "义务教育报名人员查询(根据身份证)",description = "义务教育报名人员查询(根据身份证)")
    @PostMapping(value = "/eduStudentEnrollJh0017", produces = "application/json;charset=UTF-8")
    public AppResponse<PageInfo<EduStudentEnrollVO>> getYwApplyInfoByIdcard(@RequestBody @Validated EduStudentEnrollQueryVO vo) {
        return AppResponse.successData(eduStudentEnrollIntegration.getYwApplyInfoByIdcard(vo));
    }

    @Idempotent(expire="PT2S") //2秒内防重复提交
    @Operation(summary = "义务教育报名信息导出",description = "义务教育报名信息导出")
    @PostMapping(value = "/eduStudentEnrollJh0018", produces = "application/json;charset=UTF-8")
    @NoSignCrypto
    public AppResponse exportSchoolInfo(@RequestBody @Validated EduStudentEnrollQueryVO vo, HttpServletResponse response) {
        eduStudentEnrollIntegration.exportYwApplyInfo(vo,response);
        return AppResponse.success();
    }

    @Operation(summary = "义务教育报名人数信息查询",description = "义务教育报名人数信息查询")
    @PostMapping(value = "/eduStudentEnrollJh0020", produces = "application/json;charset=UTF-8")
    public AppResponse<StudentEnrollCntVO> queryBmCnt(@RequestBody @Validated EduStudentEnrollQueryVO vo) {
        return AppResponse.successData(eduStudentEnrollIntegration.queryBmCnt(vo));
    }

    @Idempotent(expire="PT2S") //2秒内防重复提交
    @Operation(summary = "义务教育民转公批量录取",description = "义务教育民转公批量录取")
    @PostMapping(value = "/eduStudentEnrollJh0021", produces = "application/json;charset=UTF-8")
    public AppResponse batchMzgAdmit(@RequestBody @Validated StudentEnrollBatchVO vo) {
        eduStudentEnrollIntegration.batchMzgAdmit(vo);
        return AppResponse.success();
    }



    @Idempotent(expire="PT2S") //2秒内防重复提交
    @Operation(summary = "义务教育民转公停止招生",description = "义务教育民转公停止招生")
    @PostMapping(value = "/eduStudentEnrollJh0024", produces = "application/json;charset=UTF-8")
    public AppResponse ywMzgStop(@RequestBody @Validated StudentEnrollStopVO vo) {
        eduStudentEnrollIntegration.ywMzgStop(vo);
        return AppResponse.success();
    }
    @Operation(summary = "获取义务教育民转公报名信息",description = "获取义务教育民转公报名信息")
    @PostMapping(value = "/eduStudentEnrollJh0025", produces = "application/json;charset=UTF-8")
    public AppResponse<PageInfo<EduStudentEnrollVO>> getYwMzgApplyInfo(@RequestBody @Validated EduStudentEnrollQueryVO vo) {
        return AppResponse.successData(eduStudentEnrollIntegration.getYwMzgApplyInfo(vo));
    }
    @Idempotent(expire="PT2S") //2秒内防重复提交
    @Operation(summary = "义务教育民转公审核",description = "义务教育民转公审核")
    @PostMapping(value = "/eduStudentEnrollJh0026", produces = "application/json;charset=UTF-8")
    public AppResponse ywMzgAudit(@RequestBody @Validated StudentEnrollSaveVO vo) {
        eduStudentEnrollIntegration.ywMzgAudit(vo);
        return AppResponse.success();
    }

    @Idempotent(expire="PT2S") //2秒内防重复提交
    @Operation(summary = "义务教育民转公录取",description = "义务教育民转公录取")
    @PostMapping(value = "/eduStudentEnrollJh0027", produces = "application/json;charset=UTF-8")
    public AppResponse ywMzgApply(@RequestBody @Validated StudentEnrollSaveVO vo) {
        eduStudentEnrollIntegration.ywMzgApply(vo);
        return AppResponse.success();
    }
    @Idempotent(expire="PT2S") //2秒内防重复提交
    @Operation(summary = "义务教育教育局复审",description = "义务教育教育局复审")
    @PostMapping(value = "/eduStudentEnrollJh0037", produces = "application/json;charset=UTF-8")
    public AppResponse ywReview(@RequestBody @Validated StudentEnrollSaveVO vo) {
        eduStudentEnrollIntegration.ywReview(vo);
        return AppResponse.successMsg("操作成功！");
    }
    @Idempotent(expire="PT2S") //2秒内防重复提交
    @Operation(summary = "义务教育教育局单个录取",description = "义务教育教育局单个录取")
    @PostMapping(value = "/eduStudentEnrollJh0034", produces = "application/json;charset=UTF-8")
    public AppResponse ywAdmit(@RequestBody @Validated StudentEnrollSaveVO vo) {
        return AppResponse.successData(eduStudentEnrollIntegration.ywAdmit(vo));
    }
    @Idempotent(expire="PT2S") //2秒内防重复提交
    @Operation(summary = "义务教育公办学校批量录取",description = "义务教育公办学校批量录取")
    @PostMapping(value = "/eduStudentEnrollJh0035", produces = "application/json;charset=UTF-8")
    public AppResponse ywAdmitBatch(@RequestBody @Validated StudentEnrollSaveVO vo) {
        return AppResponse.successData(eduStudentEnrollIntegration.ywAdmitBatch(vo));
    }
    @Operation(summary = "获取义务教育民办第一志愿报名信息",description = "获取义务教育民办第一志愿报名信息")
    @PostMapping(value = "/eduStudentEnrollJh0036", produces = "application/json;charset=UTF-8")
    public AppResponse<PageInfo<EduStudentEnrollVO>> getYwMbApplyInfo(@RequestBody @Validated EduStudentEnrollQueryVO vo) {
        return AppResponse.successData(eduStudentEnrollIntegration.getYwMbApplyInfo(vo));
    }
    @Idempotent(expire="PT2S") //2秒内防重复提交
    @Operation(summary = "义务教育民办第一志愿报名摇号信息导出",description = "义务教育民办第一志愿报名摇号信息导出")
    @PostMapping(value = "/eduStudentEnrollJh0029", produces = "application/json;charset=UTF-8")
    @NoSignCrypto
    public void exportYwMbApplyInfo(@RequestBody @Validated EduStudentEnrollQueryVO vo, HttpServletResponse response) {
        eduStudentEnrollIntegration.exportYwMbApplyInfo(vo,response);
    }

    @Idempotent(expire="PT2S") //2秒内防重复提交
    @Operation(summary = "义务教育民办第一志愿摇号信息导入",description = "义务教育民办第一志愿摇号信息导入")
    @PostMapping(value = "/eduStudentEnrollJh0030", produces = "application/json;charset=UTF-8")
    public AppResponse<YwMbApplyFileVO> inputYwMbApplyInfo(
            YwMbApplyFileVO vo, @RequestParam("file") MultipartFile file) throws IOException {
        return AppResponse.successData(eduStudentEnrollIntegration.inputYwMbApplyInfo(vo, file));
    }

    @Idempotent(expire="PT2S") //2秒内防重复提交
    @Operation(summary = "义务教育民办第一志愿批量录取",description = "义务教育民办第一志愿批量录取")
    @PostMapping(value = "/eduStudentEnrollJh0022", produces = "application/json;charset=UTF-8")
    public AppResponse batchAdmit(@RequestBody @Validated StudentEnrollBatchVO vo) {
        eduStudentEnrollIntegration.batchAdmit(vo);
        return AppResponse.success();
    }

    @Idempotent(expire="PT2S") //2秒内防重复提交
    @Operation(summary = "义务教育民办第一志愿停止招生",description = "义务教育民办第一志愿停止招生")
    @PostMapping(value = "/eduStudentEnrollJh0031", produces = "application/json;charset=UTF-8")
    public AppResponse ywMbStop(@RequestBody @Validated StudentEnrollStopVO vo) {
        eduStudentEnrollIntegration.ywMbStop(vo);
        return AppResponse.success();
    }

    @Idempotent(expire="PT2S") //2秒内防重复提交
    @Operation(summary = "义务教育民办第一志愿审核",description = "义务教育民办第一志愿审核")
    @PostMapping(value = "/eduStudentEnrollJh0032", produces = "application/json;charset=UTF-8")
    public AppResponse ywMbAudit(@RequestBody @Validated StudentEnrollSaveVO vo) {
        eduStudentEnrollIntegration.ywMbAudit(vo);
        return AppResponse.success();
    }

    @Idempotent(expire="PT2S") //2秒内防重复提交
    @Operation(summary = "义务教育民办第一志愿录取",description = "义务教育民办第一志愿录取")
    @PostMapping(value = "/eduStudentEnrollJh0033", produces = "application/json;charset=UTF-8")
    public AppResponse ywMbApply(@RequestBody @Validated StudentEnrollSaveVO vo) {
        eduStudentEnrollIntegration.ywMbApply(vo);
        return AppResponse.success();
    }



    @Operation(summary = "获取义务教育公办报名信息",description = "获取义务教育公办报名信息")
    @PostMapping(value = "/eduStudentEnrollJh0042", produces = "application/json;charset=UTF-8")
    public AppResponse<PageInfo<EduStudentEnrollVO>> getYwGbApplyInfo(@RequestBody @Validated EduStudentEnrollQueryVO vo) {
        return AppResponse.successData(eduStudentEnrollIntegration.getYwGbApplyInfo(vo));
    }
    @Operation(summary = "获取义务教育报名信息(教育局)",description = "获取义务教育报名信息(教育局)")
    @PostMapping(value = "/eduStudentEnrollJhJyj0042", produces = "application/json;charset=UTF-8")
    public AppResponse<PageInfo<EduStudentEnrollVO>> getJyjYwBmApplyInfo(@RequestBody @Validated EduStudentEnrollQueryVO vo) {
        return AppResponse.successData(eduStudentEnrollIntegration.getJyjYwBmApplyInfo(vo));
    }

    @Idempotent(expire="PT2S") //2秒内防重复提交
    @Operation(summary = "义务教育公办审核",description = "义务教育公办审核")
    @PostMapping(value = "/eduStudentEnrollJh0043", produces = "application/json;charset=UTF-8")
    public AppResponse ywGbAudit(@RequestBody @Validated StudentEnrollSaveVO vo) {
        eduStudentEnrollIntegration.ywGbAudit(vo);
        return AppResponse.success();
    }

    @Idempotent(expire="PT2S") //2秒内防重复提交
    @Operation(summary = "义务教育公办录取",description = "义务教育公办录取")
    @PostMapping(value = "/eduStudentEnrollJh0044", produces = "application/json;charset=UTF-8")
    public AppResponse ywGbApply(@RequestBody @Validated StudentEnrollSaveVO vo) {
        eduStudentEnrollIntegration.ywGbApply(vo);
        return AppResponse.success();
    }

    @Idempotent(expire="PT2S") //2秒内防重复提交
    @Operation(summary = "义务教育公办报名信息导出",description = "义务教育公办报名信息导出")
    @PostMapping(value = "/eduStudentEnrollJh0045", produces = "application/json;charset=UTF-8")
    @NoSignCrypto
    public void exportYwGbApplyInfo(@RequestBody @Validated EduStudentEnrollQueryVO vo, HttpServletResponse response) {
        eduStudentEnrollIntegration.exportYwGbApplyInfo(vo,response);
    }

    @Idempotent(expire="PT2S") //2秒内防重复提交
    @Operation(summary = "义务教育公办停止招生",description = "义务教育公办停止招生")
    @PostMapping(value = "/eduStudentEnrollJh0046", produces = "application/json;charset=UTF-8")
    public AppResponse ywGbStop(@RequestBody @Validated StudentEnrollStopVO vo) {
        eduStudentEnrollIntegration.ywGbStop(vo);
        return AppResponse.success();
    }

    @Operation(summary = "义务教育根据学校查下配置信息",description = "义务教育根据学校查下配置信息")
    @PostMapping(value = "/eduStudentEnrollJh0047", produces = "application/json;charset=UTF-8")
    public AppResponse<List<SchoolConfigVO>> querySchoolConfigBySchoolId(@RequestBody @Validated SchoolConfigQueryVO vo) {
        return AppResponse.successData(eduStudentEnrollIntegration.querySchoolConfigBySchoolId(vo));
    }

    @Idempotent(expire="PT2S") //2秒内防重复提交
    @Operation(summary = "义务教育学校新增报名信息",description = "义务教育学校新增报名信息")
    @PostMapping(value = "/eduStudentEnrollJh0048", produces = "application/json;charset=UTF-8")
    public AppResponse schoolAddEnroll(@RequestBody @Validated SaveStudentEnrollVO vo) {
        eduStudentEnrollIntegration.schoolAddEnroll(vo);
        return AppResponse.success();
    }

    @Operation(summary = "管理员查询摇号数据",description = "管理员查询摇号数据")
    @PostMapping(value = "/eduStudentEnrollJh0050", produces = "application/json;charset=UTF-8")
    public AppResponse<PageInfo<EduStudentEnrollVO>> getEnrollLottery(@RequestBody @Validated EduStudentEnrollQueryVO vo) {
        return AppResponse.successData(eduStudentEnrollIntegration.getEnrollLottery(vo));
    }

    @Idempotent(expire="PT2S") //2秒内防重复提交
    @Operation(summary = "管理员查询摇号数据导出",description = "管理员查询摇号数据导出")
    @PostMapping(value = "/eduStudentEnrollJh0051", produces = "application/json;charset=UTF-8")
    @NoSignCrypto
    public void exportEnrollLottery(@RequestBody @Validated EduStudentEnrollQueryVO vo, HttpServletResponse response) {
        eduStudentEnrollIntegration.exportEnrollLottery(vo,response);
    }

    @PostMapping(value = "/eduStudentEnrollJh0060", produces = "application/json;charset=UTF-8")
    @Operation(summary = "摇号导出人员缓存清除",description = "摇号导出人员缓存清除")
    public AppResponse clearEnrollLotteryCache(@RequestBody EduStudentEnrollQueryVO vo) {
        eduStudentEnrollIntegration.clearEnrollLotteryCache(vo);
        return AppResponse.success();
    }

    @PostMapping(value = "/eduStudentEnrollJh0061", produces = "application/json;charset=UTF-8")
    @Operation(summary = "义务段正式报名管理缓存清除",description = "义务段正式报名管理缓存清除")
    public AppResponse clearYwEnrollCache(@RequestBody EduStudentEnrollQueryVO vo) {
        eduStudentEnrollIntegration.clearYwEnrollCache(vo);
        return AppResponse.success();
    }


    @Idempotent(expire="PT2S") //2秒内防重复提交
    @Operation(summary = "学生线下录入学生修改",description = "学生线下录入学生修改")
    @PostMapping(value = "/eduStudentEnrollJh0062", produces = "application/json;charset=UTF-8")
    public AppResponse<EduStudentEnrollVO> editStudentEnrollBySchool(@RequestBody @Validated(value = {Validators.Edit.class}) SaveStudentEnrollVO vo) {
        return AppResponse.successData(eduStudentEnrollIntegration.editStudentEnrollBySchool(vo));
    }

    @Idempotent(expire="PT2S") //2秒内防重复提交
    @Operation(summary = "报名线下核验材料核验",description = "报名线下核验材料核验")
    @PostMapping(value = "/eduStudentEnrollJh0066", produces = "application/json;charset=UTF-8")
    public AppResponse verificationAudit(@RequestBody EduStudentEnrollVerificationVO vo) {
        eduStudentEnrollIntegration.verificationAudit(vo);
        return AppResponse.success();
    }
    @Idempotent(expire="PT2S") //2秒内防重复提交
    @Operation(summary = "报名学校批量初审",description = "报名学校批量初审")
    @PostMapping(value = "/eduStudentEnrollJh0067", produces = "application/json;charset=UTF-8")
    public AppResponse ywAuthBatch(@RequestBody @Validated StudentEnrollSaveVO vo) {
        eduStudentEnrollIntegration.ywAuthBatch(vo);
        return AppResponse.success();
    }
    @Idempotent(expire="PT2S") //2秒内防重复提交
    @Operation(summary = "报名学校批量复审",description = "报名学校批量复审")
    @PostMapping(value = "/eduStudentEnrollJh0068", produces = "application/json;charset=UTF-8")
    public AppResponse ywReviewAuthBatch(@RequestBody @Validated StudentEnrollSaveVO vo) {
        eduStudentEnrollIntegration.ywReviewAuthBatch(vo);
        return AppResponse.success();
    }
    @Operation(summary = "参保缴费详情",description = "参保缴费详情")
    @PostMapping(value = "/eduStudentEnrollJh0069", produces = "application/json;charset=UTF-8")
    public AppResponse<PageInfo<EduSocialSecurityDetailVO>> verificationAudi1t(@RequestBody EduSocialSecurityQueryVO vo) {
        return AppResponse.successData(eduStudentEnrollIntegration.getSocialSecurityDetail(vo));
    }

    @Operation(summary = "根据报名id修改加报名类别",description = "根据报名id修改加报名类别")
    @PostMapping(value = "/eduStudentEnrollJh0070", produces = "application/json;charset=UTF-8")
    public AppResponse updateConfigNameByEnrollId(@RequestBody EduConfigNameAliasVO vo) {
        eduStudentEnrollIntegration.updateConfigNameByEnrollId(vo);
        return AppResponse.success();
    }
    @Operation(summary = "学校补充材料",description = "学校补充材料")
    @PostMapping(value = "/eduStudentEnrollJh0071", produces = "application/json;charset=UTF-8")
    public AppResponse upSchoolFileById(@RequestBody EduEnrollSchoolFileVO vo) {
        eduStudentEnrollIntegration.upSchoolFileById(vo);
        return AppResponse.success();
    }
    @Operation(summary = "学校选择房产",description = "学校选择房产")
    @PostMapping(value = "/eduStudentEnrollJh0072", produces = "application/json;charset=UTF-8")
    public AppResponse schoolChooseHouse(@RequestBody EduEnrollSchoolChooseHouseVO vo) {
        eduStudentEnrollIntegration.schoolChooseHouse(vo);
        return AppResponse.success();
    }
    @Idempotent(expire="PT2S") //2秒内防重复提交
    @Operation(summary = "民办学校批量录取",description = "民办学校批量录取")
    @PostMapping(value = "/eduStudentEnrollJh0073", produces = "application/json;charset=UTF-8")
    public AppResponse mbBatchAdmission(@RequestBody @Validated StudentEnrollSaveVO vo) {
        eduStudentEnrollIntegration.mbBatchAdmission(vo);
        return AppResponse.success();
    }
    @Idempotent(expire="PT2S") //2秒内防重复提交
    @Operation(summary = "民转公学校批量录取",description = "民转公学校批量录取")
    @PostMapping(value = "/eduStudentEnrollJh0074", produces = "application/json;charset=UTF-8")
    public AppResponse mzgBatchAdmission(@RequestBody @Validated StudentEnrollSaveVO vo) {
        eduStudentEnrollIntegration.mzgBatchAdmission(vo);
        return AppResponse.success();
    }

    @Idempotent(expire="PT2S") //2秒内防重复提交
    @Operation(summary = "义务教育报名信息导出(管理员/教育局)",description = "义务教育报名信息导出(管理员/教育局)")
    @PostMapping(value = "/eduStudentEnrollJh0075", produces = "application/json;charset=UTF-8")
    @NoSignCrypto
    public void exportEnrollInfo(@RequestBody @Validated EduStudentEnrollQueryVO vo, HttpServletResponse response) {
        eduStudentEnrollIntegration.exportEnrollInfo(vo,response);
    }

    @Idempotent(expire="PT2S") //2秒内防重复提交
    @Operation(summary = "义务教育报名一键退回到待审核(学校退回)",description = "义务教育报名一键退回到待审核(学校退回)")
    @PostMapping(value = "/eduStudentEnrollJh0079", produces = "application/json;charset=UTF-8")
    public AppResponse ywApplySchoolBackAuth(@RequestBody @Validated(value = {Validators.Edit.class}) EduStudentEnrollKeyVO vo) {
        eduStudentEnrollIntegration.ywApplySchoolBackAuth(vo);
        return AppResponse.success();
    }

    @Idempotent(expire="PT2S") //2秒内防重复提交
    @Operation(summary = "义务教育报名一键退回到待审核(教育局退回)",description = "义务教育报名一键退回到待审核(教育局退回)")
    @PostMapping(value = "/eduStudentEnrollJh0080", produces = "application/json;charset=UTF-8")
    public AppResponse ywApplyJyjBackAuth(@RequestBody @Validated(value = {Validators.Edit.class}) EduStudentEnrollKeyVO vo) {
        eduStudentEnrollIntegration.ywApplyJyjBackAuth(vo);
        return AppResponse.success();
    }

    @Operation(summary = "家长端查询可报名的人员信息-重新提交时查询",description = "家长端查询可报名的人员信息-重新提交时查询")
    @PostMapping(value = "/eduStudentEnrollJh0081", produces = "application/json;charset=UTF-8")
    public AppResponse<EduStudentEnrollPreVO> getBeforeByPreIdResubmit(@RequestBody @Validated EduStudentEnrollPreKeyVO vo) {
        return AppResponse.successData(eduStudentEnrollIntegration.getBeforeByPreIdResubmit(vo));
    }
    @Operation(summary = "根据报名时间控制小学初中报名审核权限",description = "根据报名时间控制小学初中报名审核权限")
    @PostMapping(value = "/eduStudentEnrollJh0082", produces = "application/json;charset=UTF-8")
    public AppResponse<Boolean> primaryAndJuniorAuthPower(@RequestBody @Validated EduStudentEnrollPreKeyVO vo) {
        return AppResponse.successData(eduStudentEnrollIntegration.primaryAndJuniorAuthPower(vo));
    }
    @Operation(summary = "判断用户报名区划",description = "判断用户报名区划")
    @PostMapping(value = "/eduStudentEnrollJh0083", produces = "application/json;charset=UTF-8")
    public AppResponse<UserAreaVO> getEnrollArea(@RequestBody @Validated EduStudentEnrollPreKeyVO vo) {
        return AppResponse.successData(eduStudentEnrollIntegration.getEnrollArea(vo));
    }
}
